# 启动django
import os
import sys
import django

base_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.append(base_dir)

os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'django_order_system.settings')
django.setup()  # 伪造让django启动

from web import models
from utils.encrypt import md5

# models.Administrator.objects.create(username='DPT', password=md5("123456"), mobile="1888888889")


for i in range(1, 31):
    models.Administrator.objects.create(
        username='DPT-{}'.format(i),
        password=md5("123456"),
        mobile='1999999998'
    )
